package com.blb.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.blb.entity.BaseEntity;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author wuzhuo
 * @since 2019-07-11
 */
@TableName("t_commodity")
public class Commodity extends BaseEntity<Commodity> {

    private static final long serialVersionUID=1L;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 价格
     */
    private Double price;

    /**
     * 图片
     */
    private String img;

    /**
     * 销量
     */
    private Integer sales;

    /**
     * 品牌id
     */
    private String brandId;

    /**
     * 库存
     */
    private Integer stock;

    /**
     * 上架时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date addTime;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Integer getSales() {
        return sales;
    }

    public void setSales(Integer sales) {
        this.sales = sales;
    }

    public String getBrandId() {
        return brandId;
    }

    public void setBrandId(String brandId) {
        this.brandId = brandId;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }
    
    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date date) {
        this.addTime = date;
    }


    @Override
    public String toString() {
        return "Commodity{" +
        "name=" + name +
        ", price=" + price +
        ", img=" + img +
        ", sales=" + sales +
        ", brandId=" + brandId +
        ", stock=" + stock +
        ", addTime=" + addTime +
        "}";
    }
}
